package com.sz.biz.logistics.billing.dto;

/**
 * Function: 计价方式. <br>
 * Date: 2017年04月19日 9:46 <br>
 * Author: wentao.chang
 */
public enum CalcTypeEnum {
    TOTALPRICE("PCT_SUM", "总价"),
    PRICE("PCT_PRICE", "单价"),
    CONTINUEPRICE("PCT_CONTINUEPRICE", "续单价"),
    CONTINUESECTIONPRICE("PCT_CONTINUESECTIONPRICE", "续阶单价");


    private String code;
    private String name;


    public CalcTypeEnum value(String code) {
        for (CalcTypeEnum ct : CalcTypeEnum.values()) {
            if (ct.getCode().equals(code)) {
                return ct;
            }
        }
        return null;
    }

    CalcTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

}
